package Review;

public class Test41a {

	public static void main(String[] args) {
          find(5);
	}
    public static void find(int s){
    	if(s<3){
    		return;
    	}
    	int start = 1;
    	int end = 2;
    	int sum = start+end;
    	while(start<(s+1)/2){
    	  if(sum==s){
    		  for(int i=start;i<=end;i++){
    			  System.out.print(i);
    			  System.out.print(" ");
    		  }
    	  }
    	  while(start<(s+1)/2&&sum<s){
    		  end++;
        	  sum+=end;
    		  if(sum==s){
    			  for(int i=start;i<=end;i++){
        			  System.out.print(i);
        			  System.out.print(" ");
        		  } 
    		  }
    	  }
    	  sum -=start;
		  start++;
    	}
    }
}
